package plus.ldl.ldltest.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import plus.ldl.ldltest.mapper.UserMapper;
import plus.ldl.ldltest.pojo.User;
import plus.ldl.ldltest.service.UserService;

import java.util.List;

/**
 * @author ldl.plus
 * @date 2020年04月27日  19:04
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void add(User user) {
        userMapper.add(user);
    }

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public void deleteById(Integer id) {
        userMapper.deleteById(id);
    }

    @Override
    public void updateById(User user) {
        userMapper.updateById(user);
    }
}
